package db_handler

import (
	db_mark "game_server/logic/db/mark"
	"game_server/model"
	"xorm.io/xorm"
)

type (
	Session = xorm.Session
)

type SaveArgs struct {
	Player *model.Player
}

type SaveResult struct {
	Rollback bool
}

type LoadArgs struct {
	Player *model.Player
}

type LoadResult struct {
}

type Interface interface {
	Name() string
	DBMark() db_mark.Enum
	OnSaveDB(session *Session, args *SaveArgs) (result *SaveResult, errs []error)
	OnLoadDB(session *Session, args *LoadArgs) (result *LoadResult, err error)
}
